/*
 * @Description:
 * @Version: 2.0
 * @Autor: wiz
 * @Date: 2023-07-06 11:34:14
 * @LastEditors: zss
 * @LastEditTime: 2024-05-27 17:11:08
 */
import { N_oSimpleToolbar } from '@/types';
import Vue from 'vue';

namespace N_cpms {
  // 外观权限item
  export interface I_actItem {
    name: string;
    title: string;
    val: boolean;
    disabled: boolean;
    actID: string;
  }

  // 权限功能
  export interface I_roleFunItem {
    funsInfo: {
      count: number; // 总笔数
      currCount: number; // 当前笔数
      deleteCount: number; // 删除笔数
    };
    selStatus: string;
    groupTitle: string;
    groupID: string;
    // 角色功能id
    roleFunIDS: Set<string>;
    funs: Array<any>;
  }
  export interface I_ruleEventMsg {
    type: string; // 'search';
    content: {
      ikey: string; // 'id';
      ukey: string; // Tsrv.globalVar.fieldName.roleobjFunsId;
      val: Array<string>; // [roleFunID];
    };
    listenType: string; // 'default';
    option: {
      autoCompleteInfo: {
        key: string; // roleFunID;
        table: string; // Tsrv.globalVar.funName.PMS_FUN;
        data: any; // row Data;
      };
    };
  }
  export interface cPms extends Vue {
    fieldList: Array<I_actItem>;
    otherList: Array<I_actItem>;
    baseList: Array<I_actItem>;
    addFunData: Array<any>;
    selectFuns: Array<any>;
    roleFunList: Array<any>;
    openFunList: Array<string>;
    baseListchange(name: string, e: boolean);
    fieldListchange(name: string, e: boolean);
    otherListchange(name: string, e: boolean);
    actionBtnClick(cf: N_oSimpleToolbar.I_Conf, e: any);
    funBtnClick(cf: N_oSimpleToolbar.I_Conf, e: any);
    roleFunRadioClick(groupID: string, label: string);
    roleFunItemClick(groupID: string, roleFunID: string, item: any);
    loadRoleRule(msg: any);
    onFunSelect(p: boolean);
    funCpFromRoleByFunGroup(item: N_cpms.I_roleFunItem, e: any);
    funAddByFunGroup(item: N_cpms.I_roleFunItem, e: any);
    addFunChkChange(e: Array<any>);
    onDialogOK(e: any);
  }
}

export { N_cpms };
